/* WordPress后台专用样式 - 蜘蛛监控 */

/* 全局容器 */
.spider-monitor-wrap {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* 统计卡片样式 */
.spider-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stats-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-left: 4px solid #0073aa;
    padding: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, transparent 50%, rgba(0,115,170,0.1) 50%);
}

.stats-card-primary { border-left-color: #0073aa; }
.stats-card-success { border-left-color: #46b450; }
.stats-card-info { border-left-color: #00a0d2; }
.stats-card-warning { border-left-color: #ffb900; }

.stats-card-icon {
    float: right;
    font-size: 24px;
    color: #8c8f94;
    margin-left: 15px;
}

.stats-card-content h3 {
    margin: 0;
    font-size: 32px;
    font-weight: 400;
    line-height: 1.2;
    color: #1d2327;
    transition: color 0.3s ease;
}

.stats-card:hover .stats-card-content h3 {
    color: #0073aa;
}

.stats-card-content p {
    margin: 8px 0 0;
    color: #50575e;
    font-size: 14px;
    font-weight: 500;
}

/* 网格布局 */
.spider-dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* WordPress标准面板样式优化 */
.spider-monitor-wrap .postbox {
    margin: 0;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    background: #fff;
}

.spider-monitor-wrap .postbox-header {
    border-bottom: 1px solid #ccd0d4;
    background: #f9f9f9;
}

.spider-monitor-wrap .postbox-header h2 {
    margin: 0;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.spider-monitor-wrap .inside {
    padding: 12px;
    margin: 0;
}

/* 表格样式 */
.spider-monitor-wrap .wp-list-table {
    border: none;
    box-shadow: none;
}

.spider-monitor-wrap .wp-list-table th,
.spider-monitor-wrap .wp-list-table td {
    padding: 8px 10px;
    vertical-align: middle;
}

.spider-monitor-wrap .wp-list-table th {
    background: #f9f9f9;
    font-weight: 600;
    color: #1d2327;
}

/* 状态码样式 */
.status-code {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    font-family: monospace;
    color: #fff;
    min-width: 30px;
    text-align: center;
}

.status-200 { background-color: #46b450; }
.status-301 { background-color: #ffb900; }
.status-302 { background-color: #f56e28; }
.status-404 { background-color: #dc3232; }
.status-500 { background-color: #d63638; }

/* 列表样式 */
.popular-paths-list,
.status-codes-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.popular-paths-list li,
.status-codes-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f1;
    font-size: 13px;
}

.popular-paths-list li:last-child,
.status-codes-list li:last-child {
    border-bottom: none;
}

.path-url {
    font-family: monospace;
    font-size: 12px;
    color: #50575e;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.path-count,
.status-count {
    font-weight: 600;
    color: #1d2327;
    background: #f0f0f1;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
}

/* 状态徽章 */
.status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    color: #fff;
    font-weight: bold;
    font-size: 11px;
    min-width: 30px;
    text-align: center;
}

/* URL单元格 */
.url-cell {
    font-family: monospace;
    font-size: 12px;
    color: #50575e;
    cursor: help;
}

/* 无数据提示 */
.no-data {
    text-align: center;
    color: #8c8f94;
    font-style: italic;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 4px;
    margin: 10px 0;
}

/* 按钮样式 */
.spider-monitor-wrap .button {
    margin: 0;
}

.spider-monitor-wrap .button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 4px;
    vertical-align: text-bottom;
}

/* 通知样式 */
.spider-monitor-wrap .notice {
    margin: 20px 0;
}

/* 响应式设计 */
@media screen and (max-width: 1200px) {
    .spider-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 782px) {
    .spider-stats-cards {
        grid-template-columns: 1fr;
    }
    
    .spider-monitor-wrap .postbox {
        margin-bottom: 20px;
    }
    
    .spider-monitor-wrap .inside {
        padding: 10px;
    }
}

@media screen and (max-width: 480px) {
    .stats-card {
        padding: 15px;
    }
    
    .stats-card-content h3 {
        font-size: 28px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 悬停效果 */
.stats-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

.spider-monitor-wrap .postbox:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    transition: box-shadow 0.3s ease;
}